<!--
  @author duanzuocai
  @since 2018/10/19 23:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--搜索条件置于单独的layui-card-body中
    -->
<div class="layui-card-body" th:fragment="query">
    <!--用于保存或传值的隐藏表单元素
        置于form标签内的最上方
        -->

    <!--每个zmn-form-item一行，每行4列
       支持页面自适应，1280分辨率下不折行
       -->
    <div class="zmn-form-item">

        <!--默认情况下标签item-inline占据1列，
            加入样式col2，表示该item-inline占据2列，用于支持多级联动下拉框
            -->
        <div class="item-inline">
            <label class="inline-label">ID/名称：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" name="nameOrCompanyId" th:value="${vo.nameOrCompanyId}" placeholder="模糊搜索" autocomplete="off" class="layui-input" style="width:233px;" maxlength="45"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">联系人/电话：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" name="contactOrPhone" th:value="${vo.contactOrPhone}" placeholder="模糊搜索" autocomplete="off" class="layui-input" style="width:233px;" maxlength="45"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">公司类型：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="type">
                            <option value="" th:selected="${0 == vo.type}">全部</option>
                            <option th:each="type:${types}" th:selected="${type.key == vo.type}" th:value="${type.key}"
                                    th:text="${type.value}">
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">平台：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="plat" id="plat" lay-search>
                            <option value="" th:selected="${0 == vo.plat}">全部</option>
                            <option th:value="${item.key}"
                                    th:text="${item.value}"
                                    th:selected="${item.key == vo.plat}"
                                    th:each="item:${platTypeList}">
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="zmn-form-item">
        <div class="item-inline col2">
            <label class="inline-label">城市区域：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col3">
                        <select id="provinceId" name="provinceId" lay-filter="provinceId" value="0" lay-search>
                            <option value="0" th:selected="${0 == vo.provinceId}">-省份-</option>
                            <option th:value="${item.value}" th:selected="${item.value == vo.provinceId}" th:text="${item.text}" th:each="item:${provinces}"></option>
                        </select>
                    </div>
                    <div class="box-input-inline col3">
                        <select id="cityId" name="cityId" value="0" lay-filter="cityId" lay-search>
                            <option value="0" th:selected="${0 == vo.cityId}">-城市-</option>
                            <option th:value="${item.value}" th:selected="${item.value == vo.cityId}" th:text="${item.text}" th:each="item:${citys}"></option>

                        </select>
                    </div>
                    <div class="box-input-inline col3">
                        <select id="countyId" name="countyId" value="0"  lay-search>
                            <option value="0" th:selected="${0 == vo.countyId}">-区县-</option>
                            <option th:value="${item.value}" th:selected="${item.value == vo.countyId}" th:text="${item.text}" th:each="item:${countys}"></option>

                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">公司状态：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="status" th:value="${vo.status}">
                            <option value="0" th:selected="${0 == vo.status}">全部</option>
                            <zmn th:each="status:${statuses}">
                                <option th:value="${status.key}" th:selected="${status.key == vo.status}"
                                        th:text="${status.value}"></option>
                            </zmn>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="item-inline">
            <label class="inline-label">创建日期：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" id="timeRange" name="timeRange" th:value="${vo.timeRange}" placeholder="yyyy/MM/dd - yyyy/MM/dd"
                               class="layui-input" autocomplete="off"/>
                    </div>
                </div>
            </div>
        </div>
        <!--查询与重置按钮
            查询按钮lay-filter属性统一定义为zmn-form-submit
            如查询条件较多，为节省横向空间，查询按钮使用小按钮(无文字“查询”)
            -->
        <div class="item-submit">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="LAY-user-back-search"><i class="layui-icon">&#xe615;</i> </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm"  lay-submit="" lay-filter="zmn-company-form-reset"><i class="layui-icon">&#xe669;</i></button>
        </div>

    </div>
</div>
